﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using BUS;
using DTO;
namespace WindowsFormsApplication1
{
    public partial class frmTimKiemNV : Form
    {
        public frmTimKiemNV()
        {
            InitializeComponent();
        }
        NhanVienBUS NV_BUS = new NhanVienBUS();
        private void frmTimKiemNV_Load(object sender, EventArgs e)
        {
            NV_BUS.khoitao_KN();
           
        }

        private void panel2_Paint(object sender, PaintEventArgs e)
        {
           
        }

        private void cbxMaNV_Click(object sender, EventArgs e)
        {
             txtMaNV.Enabled = true;
             
        }

        private void cbxMaNV_CheckedChanged(object sender, EventArgs e)
        {
           
        }

        private void cbxMaNV_CheckStateChanged(object sender, EventArgs e)
        {
            txtMaNV.Enabled = false;
        }

        private void txtMaNV_TextChanged(object sender, EventArgs e)
        {
           
                NV_BUS.khoitao_KN();
                dataGridView1.DataSource = NV_BUS.TimKiem_MaNV(txtMaNV.Text);
          

        }

        private void txtTenNV_TextChanged(object sender, EventArgs e)
        {
            NV_BUS.khoitao_KN();
            dataGridView1.DataSource = NV_BUS.TimKiem_theotenNV(txtTenNV.Text);
        }

        private void cbxTenNV_Click(object sender, EventArgs e)
        {
            txtTenNV.Enabled = true;
        }

    }
}
